<?php
class mylib {
	public function __construct($request){

	}

	public function render( $request ,$router=''){

		if(defined('PAGE_CHARSET')){//如果当前页面设置了语言集合，使用当前页面设置
			myresponse::setHeaderCharset(PAGE_CHARSET);
		}else{
			myresponse::setHeaderCharset('utf-8');
		}

		foreach ($this as $key => $val){
			$$key = $val;
		}
		if(!is_object($router))	{
			$router = new myrouter( $request );
		}

		if(IS_DEBUG){
			@include($router->getViewFile());
		}else {
			@include($router->getViewFile());
		}
	}//end render


}
?>